package engine.fov;

/**
 * An interface that allows visibility algorithms to decide which points are in the board, which
 * points are obstacles to this form of visibility, and visit those points on the board.
 * 
 * @author sdatta
 */
public interface Board {

	/**
	 * @param x
	 *            x-coordinate in cells
	 * @param y
	 *            y-coordinate in cells
	 * @return whether the location (x, y) is inside the board
	 */
	public boolean contains(int x, int y);

	/**
	 * Lit tiles extend the FOV.
	 * 
	 * @param x
	 *            x-coordinate in cells
	 * @param y
	 *            y-coordinate in cells
	 * @return whether the tile is lit
	 */
	public boolean isLit(int x, int y);

	/**
	 * @param x
	 *            x-coordinate in cells
	 * @param y
	 *            y-coordinate in cells
	 * @return whether the location (x, y) is a light-blocking obstruction
	 */
	public boolean isObstruction(int x, int y);

	/**
	 * This method is called on all locations that are visible. It should set the location's status
	 * to visible.
	 * 
	 * @param x
	 *            x-coordinate in cells
	 * @param y
	 *            y-coordinate in cells
	 */
	public void visit(int x, int y);
}
